<template>
  <div>
    <el-dialog
      :title="title"
      :closeOnClickModal="false"
      :visible.sync="show"
      width="650px">
		  <div v-html="selectTable.detail" class="content"></div>
      <div slot="footer" class="dialog-footer">
        <el-button @click="show = false">关 闭</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import {artGetById} from '@/utils/weApi'
export default {
  components: {
  },
  props: {
    data: Object
  },
  watch: {
    show (newVal) {
      this.$parent.content = false
    }
  },
  computed: {
    title () {
      return '查看内容'
    }
  },
  data () {
    return {
      pload: false,
      show: true,
      selectTable: {}
    }
  },
  created () {
  	this.getData()
  },
  methods: {
    async getData(){
      this.pload = false
      const Datas = await artGetById({
        articleId: this.data.articleId
      })
      this.selectTable = Datas
    }
  }
}
</script>
<style>
  .content{
    max-height: 400px;
    overflow: hidden;
    overflow-y: auto;
    
  }
  .content img {
    max-width: 100%;
  }
</style>